Skip to content

Conversation

@mmiqball
Copy link
Collaborator

@mmiqball mmiqball commented Jan 29, 2025

Notion ticket link

Authentication Logic and Routes

Implementation description

Auth Service

  • implements functionality related to authentication, such as checking authorization and roles, generating and revoking tokens etc.

Auth Routes

  • routes for logging in, refreshing access tokens, logging out
  • related schemas added to the schemas directory

Middleware

  • Basic authorization checks for Firebase access tokens implemented using the format in FastAPI's docs
  • Role based access control added as dependency injections

Local Testing

Make sure your local backend is running:

  • docker compose up -d db in llsc to get the database running
  • pdm run dev in llsc/backend to get server running

Access route schemas and definitions from {server url}/docs and test with Postman. Recommended order is to:

  • create a user with the schema, verify it shows up in both the docker container db and in Firebase
  • login using their credentials
  • use test endpoints to verify if auth token middleware and the role-based access control dependency works as expected
  • refresh the user's token
  • logout

What should reviewers focus on?

  • General approach and architecture
  • Any design concerns that may be affected
  • Is the implementation flexible enough to accommodate changes that will definitely come up later on?

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@mmiqball mmiqball changed the title Mujtaba emma/llsc 18 auth Auth Service + Routes + Middleware Feb 25, 2025
@mmiqball mmiqball force-pushed the mujtaba-emma/LLSC-18-auth branch from e84f5cc to 8d11727 Compare February 26, 2025 00:33
@mmiqball mmiqball changed the title Auth Service + Routes + Middleware Implement Authentication Logic, Routes, Middleware Feb 26, 2025
@ebwu95 ebwu95 marked this pull request as ready for review March 26, 2025 00:11
ebwu95 and others added 7 commits May 21, 2025 20:38
## Notion ticket link
<!-- Please replace with your ticket's URL -->

[LLSC-30](https://www.notion.so/uwblueprintexecs/Task-Board-db95cd7b93f245f78ee85e3a8a6a316d)


<!-- Give a quick summary of the implementation details, provide design
justifications if necessary -->
## Implementation description
* 


<!-- What should the reviewer do to verify your changes? Describe
expected results and include screenshots when appropriate -->
## Steps to test
1.


<!-- Draw attention to the substantial parts of your PR or anything
you'd like a second opinion on -->
## What should reviewers focus on?
* 


## Checklist
- [ ] My PR name is descriptive and in imperative tense
- [ ] My commit messages are descriptive and in imperative tense. My
commits are atomic and trivial commits are squashed or fixup'd into
non-trivial commits
- [ ] I have run the appropriate linter(s)
- [ ] I have requested a review from the PL, as well as other devs who
have background knowledge on this PR or who will be building on top of
this PR
## Notion ticket link
<!-- Please replace with your ticket's URL -->
[Ticket
Name](https://www.notion.so/uwblueprintexecs/Task-Board-db95cd7b93f245f78ee85e3a8a6a316d)


<!-- Give a quick summary of the implementation details, provide design
justifications if necessary -->
## Implementation description
* 


<!-- What should the reviewer do to verify your changes? Describe
expected results and include screenshots when appropriate -->
## Steps to test
1.


<!-- Draw attention to the substantial parts of your PR or anything
you'd like a second opinion on -->
## What should reviewers focus on?
* 


## Checklist
- [ ] My PR name is descriptive and in imperative tense
- [ ] My commit messages are descriptive and in imperative tense. My
commits are atomic and trivial commits are squashed or fixup'd into
non-trivial commits
- [ ] I have run the appropriate linter(s)
- [ ] I have requested a review from the PL, as well as other devs who
have background knowledge on this PR or who will be building on top of
this PR
## Notion ticket link
<!-- Please replace with your ticket's URL -->
[Ticket
Name](https://www.notion.so/uwblueprintexecs/Task-Board-db95cd7b93f245f78ee85e3a8a6a316d)


<!-- Give a quick summary of the implementation details, provide design
justifications if necessary -->
## Implementation description
* 


<!-- What should the reviewer do to verify your changes? Describe
expected results and include screenshots when appropriate -->
## Steps to test
1.


<!-- Draw attention to the substantial parts of your PR or anything
you'd like a second opinion on -->
## What should reviewers focus on?
* 


## Checklist
- [x] My PR name is descriptive and in imperative tense
- [x] My commit messages are descriptive and in imperative tense. My
commits are atomic and trivial commits are squashed or fixup'd into
non-trivial commits
- [x ] I have run the appropriate linter(s)
- [x] I have requested a review from the PL, as well as other devs who
have background knowledge on this PR or who will be building on top of
this PR
## Notion ticket link
<!-- Please replace with your ticket's URL -->
[Ticket
Name](https://www.notion.so/uwblueprintexecs/Task-Board-db95cd7b93f245f78ee85e3a8a6a316d)


<!-- Give a quick summary of the implementation details, provide design
justifications if necessary -->
## Implementation description
* 


<!-- What should the reviewer do to verify your changes? Describe
expected results and include screenshots when appropriate -->
## Steps to test
1.


<!-- Draw attention to the substantial parts of your PR or anything
you'd like a second opinion on -->
## What should reviewers focus on?
* 


## Checklist
- [ ] My PR name is descriptive and in imperative tense
- [ ] My commit messages are descriptive and in imperative tense. My
commits are atomic and trivial commits are squashed or fixup'd into
non-trivial commits
- [ ] I have run the appropriate linter(s)
- [ ] I have requested a review from the PL, as well as other devs who
have background knowledge on this PR or who will be building on top of
this PR
@ebwu95 ebwu95 closed this May 22, 2025
@ebwu95 ebwu95 reopened this May 22, 2025
@ebwu95 ebwu95 merged commit d476953 into main May 25, 2025
1 check passed
@ebwu95 ebwu95 deleted the mujtaba-emma/LLSC-18-auth branch May 25, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants